// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

#pragma once

#include "vector.h"
#include "GravBody.h"
#include <Ogre.h>

/*class PhysObject
{
public:
	PhysObject(void);
	~PhysObject(void);
	VECTOR position;
	VECTOR velocity;
	VECTOR tmpposition;
	VECTOR tmpvelocity;
	void update(double dt, std::vector<PhysBody*> *bodies);
	HANDLE obj_mutex;
	std::vector<PhysBody*>::iterator iter;
}; */


class Object
{
public:
	Object(Body* _startBody, Ogre::SceneNode* sn);
	~Object(void);
	Vec3 position;
	Vec3 velocity;
	Ogre::Vector3 rposition;
	//PhysObject* physObject;
	void update();
	void launch();
	Ogre::SceneNode* node;
	std::vector<Body*>::iterator iter;
	Body* startBody;
	bool active;
	float firedirection;
	double power;
	Ogre::SceneNode* pointer;
	Ogre::RibbonTrail* rt;
	size_t ind;
	Ogre::ManualObject* msh;
	int trailCleared;
};
